import request from '@/utils/request'

const api_name = '/com'

export default {
  // 新增评论/回复
  createDiscuss(discussionAddRequest) {
    return request({
      url: `${api_name}`,
      method: 'post',
      data: discussionAddRequest
    })
  },
  // 分页获取讨论（页数固定，且不需要总数，返回List即可）
  getDiscussionList(discussionPageRequest) {
    return request({
      url: `${api_name}/list`,
      method: 'post',
      data: discussionPageRequest
    })
  },
  // 举报某个评论
  reportDiscussion(discussionReportRequest) {
    return request({
      url: `${api_name}/report`,
      method: 'post',
      data: discussionReportRequest
    })
  }
}
